#!/usr/bin/env node

const Koa = require('koa'),log = console.log;

const app = new Koa();


app.use((ctx,next)=>{  //M-ms
 const start = Date.now();
 log(`${ctx.method} ${ctx.path}`);
 
 next();
 const end = Date.now();
 
 log(`${ctx.method} ${ctx.path} cost:${end-start}ms`);

});

app.listen(8080);

